package com.hy.video.monitor.exception;

import com.hy.video.monitor.util.Constants;
import org.zalando.problem.AbstractThrowableProblem;
import org.zalando.problem.Status;

import java.net.URI;

// 重复数据异常处理通用类
public class DuplicateProblem extends AbstractThrowableProblem {

//    private static final URI TYPE = URI.create(Constants.PROBLEM_BASE_URI + "/duplicate");
//
//    public DuplicateProblem(String title, String detail) {
//        super(
//            TYPE,
//            title,
//            Status.CONFLICT,
//            detail);
//    }
    private static final URI TYPE = URI.create(Constants.PROBLEM_BASE_URI + "/duplicate");

    public DuplicateProblem(String msg) {
        super(
            TYPE,
            "发现重复数据",
            Status.CONFLICT,
            msg);
    }
}

